﻿using System;
using System.ComponentModel;

namespace YArchitech.Revit.MEP.Modeling
{
	public class WireParameters
	{
		[Category("参数")]
		[DisplayName("导线类型")]
		[TypeConverter(typeof(ComboBoxItemWireType))]
		public string WireType
		{
			get
			{
				return this.wireType;
			}
			set
			{
				this.wireType = value;
			}
		}

		[Category("参数")]
		[DisplayName("线型")]
		[TypeConverter(typeof(ComboBoxItemLineType))]
		public string LineType
		{
			get
			{
				return this.lineType;
			}
			set
			{
				this.lineType = value;
			}
		}

		[Category("参数")]
		[DisplayName("火线")]
		public int WireHot
		{
			get
			{
				if (this.wireHot <= 0)
				{
					return 1;
				}
				return this.wireHot;
			}
			set
			{
				this.wireHot = value;
			}
		}

		[Category("参数")]
		[DisplayName("中性线")]
		public int WireNeutral
		{
			get
			{
				if (this.wireNeutral <= 0)
				{
					return 1;
				}
				return this.wireNeutral;
			}
			set
			{
				this.wireNeutral = value;
			}
		}

		[Category("参数")]
		[DisplayName("地线")]
		public int WireGround
		{
			get
			{
				if (this.wireGround < 0)
				{
					return 1;
				}
				return this.wireGround;
			}
			set
			{
				this.wireGround = value;
			}
		}

		[Category("参数")]
		[DisplayName("火线截面")]
		public double HotWireCrossSection
		{
			get
			{
				if (this.hotWireCrossSection <= 0.0)
				{
					return 2.5;
				}
				return this.hotWireCrossSection;
			}
			set
			{
				this.hotWireCrossSection = value;
			}
		}

		[Category("参数")]
		[DisplayName("PE/N截面")]
		public double WireCrossSection
		{
			get
			{
				if (this.wireCrossSection <= 0.0)
				{
					return 2.5;
				}
				return this.wireCrossSection;
			}
			set
			{
				this.wireCrossSection = value;
			}
		}

		[Category("参数")]
		[DisplayName("敷设方式")]
		[TypeConverter(typeof(ComboBoxItemLayMode))]
		public string LayMode
		{
			get
			{
				return this.layMode;
			}
			set
			{
				this.layMode = value;
			}
		}

		protected const string categoryName = "参数";

		private string wireType;

		private string lineType;

		private int wireHot = 1;

		private int wireNeutral = 1;

		private int wireGround = 1;

		private double hotWireCrossSection = 2.5;

		private double wireCrossSection = 2.5;

		private string layMode;
	}
}
